﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RSSReader.MobileClient.Framework;

namespace RSSReader.MobileClient.Model
{
    class LUser
    {
        public string UserName {get; set; }
        public string Password { get; set; }
        public string Email { get; set; }
        public string UserId { get; set; }

        public LUser(string _UserName, string _Password)
        {
            UserName = _UserName;
            MD5Hash _SHA256Hash = new MD5Hash();
            Password = _SHA256Hash.GetMD5Hash(_Password);
        }

        public LUser(string _UserName, string _Password, string _email)
        {
            UserName = _UserName;
            Email = _email;
            MD5Hash _SHA256Hash = new MD5Hash();
            Password = _SHA256Hash.GetMD5Hash(_Password);
        }

        public LUser GetCopy()
        {
            LUser copy = (LUser)this.MemberwiseClone();
            return copy;
        }
    }
}
